//  随机的图片背景加载
import Vue from 'vue'
// 随机加载的背景占位符
import LazyBg1 from '../../assets/images/i_lazy_bg_cac0ba.png'
import LazyBg2 from '../../assets/images/i_lazy_bg_d3dbe3.png'
import LazyBg3 from '../../assets/images/i_lazy_bg_d5dbd3.png'
import LazyBg4 from '../../assets/images/i_lazy_bg_dcccb3.png'
import LazyBg5 from '../../assets/images/i_lazy_bg_e7d5e6.png'
import LazyBg6 from '../../assets/images/i_lazy_bg_f0d4d8.png'

Vue.directive('lazy-img', {
  bind: function (el) {
    el.src = [LazyBg1, LazyBg2, LazyBg3, LazyBg4, LazyBg5, LazyBg6][Math.floor(Math.random() * 6)];
  }
});